<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script>
	<style type="text/css">
		input.ng-invalid {
			background-color: red;
		}
	</style>
</head>
<body>
	<!--<div ng-app="myApp" ng-controller="myCtrl">
		<input type="text" ng-model="name" />
		 双向绑定 
		<p>{{name}}</p>
	</div>-->
	<!-- <form ng-app="" name="myForm">
		Email:
		<input type="email" name="myAddress" ng-model="text" />
		<span ng-show="myForm.myAddress.$error.email">不是一个合法的邮箱地址</span>
	</form> -->
	<!-- <form ng-app="" name="form" ng-init="text='jack@163.com'">
		email:
		<input type="email" name="address" ng-model="text" required />
		<h1>状态</h1>
		{{form.address.$valid}}
		{{form.address.$dirty}}
		{{form.address.$touched}}
	</form> -->
	<div ng-app="" name="myApp">
		<input type="text" name="myName" ng-model="text" required="required" />
	</div>
	

	<script type="text/javascript">
		var app = angular.module("myApp", []);

		app.controller("myCtrl", function($scope) {
			$scope.name = "John Doe";
		});


	</script>
</body>
</html>